﻿@model List<KRM.Core.WebPermissionDepartment>
@{
    ViewBag.Title = "ControllerEditor";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div id="addController" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="addController" aria-hidden="true">
    <form action="/permission/createcontroller" method="POST" class="margin0">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h5>New controller</h5>
        </div>
        <div class="modal-body">
            <div class="row-fluid">
                <div class="span3">Controller Name</div>
                <div class="span7">
                    <input type="text" name="Name" class="input-block-level" /></div>
            </div>
        </div>
        <div class="modal-footer">
            <input type="submit" value="Create" class="btn btn-primary" />
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
        </div>
    </form>
</div>
<div class="container-fluid">
    <div class="box">
        <div class="box-title">
            <h3>Controller editor</h3>
        </div>
        <div class="page-header"></div>
        @Html.Partial("Partial/_MessageResult")
        <div class="row-fluid">
            <div class="span3">
                <fieldset class="text-center">
                    <legend class="text-left">Select Controller</legend>
                    @Html.ListBox("Controller", null, new { style = "height:241px", onchange = "controllerselected(this.value)" })
                    <a class="btn btn-success" style="margin-top: 10px" data-toggle="modal" href="#addController" >New controller</a>
                    <a href="javascript:;" id="btn-deletecontroller" class="btn btn-danger" onclick="return confirm('Are you sure?')" style="margin-top: 10px; margin-left: 10px" >Delete</a>
                </fieldset>
            </div>
            <form action="/permission/savecontrollerdepartment" method="POST" class="controllerDepartment span9" id="frsavecontrollerdepartment">
                <fieldset>
                    <legend>Department</legend>
                </fieldset>
            </form>
        </div>
    </div>
</div>

